import { request } from './request.js'

export function FindMessagesByMemberConversationId(params) {
  const array = [];
  params.memberConversationId && array.push(`memberConversationId=${params.memberConversationId}`);
  params.lastId && array.push(`lastId=${params.lastId}`);
  params.searchDirection && array.push(`searchDirection=${params.searchDirection}`);
  return request({ method: 'Get', url: `/im/message/messages?${array.join('&')}` });
}

export function FindMessagesByConversationId(params) {
  const array = [];
  params.conversationId && array.push(`conversationId=${params.conversationId}`);
  params.lastId && array.push(`lastId=${params.lastId}`);
  params.searchDirection && array.push(`searchDirection=${params.searchDirection}`);
  return request({ method: 'Get', url: `/im/message/messages?${array.join('&')}` });
}